﻿<Controls:MetroWindow x:Class="ChoWorkflowDashboard.ChoClusterNodesViewer"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:ChoWorkflowDashboard"
        mc:Ignorable="d"
        Title="Cluster Nodes Viewer" Height="350" Width="525" ResizeMode="CanResize" ShowInTaskbar="False" 
        Topmost="False"
        BorderBrush="{DynamicResource AccentColorBrush}"
        BorderThickness="1" ShowMaxRestoreButton="false" ShowMinButton="false"
        >
    <DockPanel>
        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right" Margin="2">
            <Button Name="btnRefresh" Width="75" Margin="2,0,0,0" Click="btnRefresh_Click">Refresh</Button>
            <Button Name="btnOK" Width="75" Margin="2,0,0,0" Click="btnOK_Click" IsDefault="True">OK</Button>
            <Button Name="btnCancel" Width="75" Margin="2,0,0,0" IsCancel="True" Click="btnCancel_Click">Cancel</Button>
        </StackPanel>
        <Grid >
            <Grid.RowDefinitions>
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="50*" />
                <ColumnDefinition Width="5" />
                <ColumnDefinition Width="50*" />
            </Grid.ColumnDefinitions>
            <GroupBox Grid.Row="0" Grid.Column="0" Header="Clusters" Name="groupBox3" Margin="2"
                                  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
                <ListView  Name="lstClusters" ItemsSource="{Binding Path=Data}" DisplayMemberPath="Key" IsSynchronizedWithCurrentItem="True" SelectedValuePath="Value" >
                    <ListView.ItemContainerStyle>
                        <Style TargetType="ListViewItem">
                            <EventSetter Event="PreviewMouseLeftButtonDown" Handler="lstClustersListViewItem_PreviewMouseLeftButtonDown" />
                        </Style>
                    </ListView.ItemContainerStyle>
                </ListView>
            </GroupBox>
            <GridSplitter Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" ResizeBehavior="PreviousAndNext" Width="1" Margin="2"/>
            <GroupBox Grid.Row="0" Grid.Column="2" Header="Nodes" Name="groupBox4" Margin="2"
                                  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
                <ListView Name="lstNodes" ItemsSource="{Binding ElementName=lstClusters, Path=SelectedValue}" >
                    <ListView.ItemContainerStyle>
                        <Style TargetType="ListViewItem">
                            <EventSetter Event="PreviewMouseLeftButtonDown" Handler="lstNodesListViewItem_PreviewMouseLeftButtonDown" />
                        </Style>
                    </ListView.ItemContainerStyle>
                </ListView>
            </GroupBox>
        </Grid>
    </DockPanel>
</Controls:MetroWindow>
